package com.ggsd.mytestwork.entity;

import lombok.Data;
import org.springframework.http.HttpStatus;

/**
 * @Author: DingZhen
 * @Data:2025-11-13 01:48
 */
@Data
public class ResponseMessage<T> {
    private Integer code;
    private String message;
    private T data;
    public static <T> ResponseMessage<T> success(T data){
        ResponseMessage responseMessage = new ResponseMessage();
        responseMessage.setCode(HttpStatus.OK.value());
        responseMessage.setMessage("success");
        responseMessage.setData(data);
        return responseMessage;
    }

}
